-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couple fixes in rpmdb (double free, and rpmdbCheckTerminate return code) #92
Conversation
... and rpmdbIndexIterator. This makes functions assume that the object has been freed if it is not on the list. Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
This function is not necessarily called first by rpmdbCheckSignals, as long as it is a part of API. Thus, it is important to return the same value on subsequent runs. Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, indeed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as well. 👍
On 09/19/2016 07:33 PM, Gleb Pfotenhauer-Malinowski wrote:
Wow, that sounds like a fix for this rather ancient issue that I guess
|
Nice catch! Always amazing what ancient bugs can still be found in even very basic code paths... sigh Anyway. Thanks a lot for hunting this down. Pushed. |
This code:
tries to free
MatchIterator
again inatexit
destructor.I tried
if (rpmdbCheckTerminate(0) == 0) rpmdbFreeIterator(mi);
, butrpmdbCheckTerminate
return code is not reliable.